package com.example.studyplanning.servicesImpl;

import com.example.studyplanning.entity.Tips;
import com.example.studyplanning.mapper.TipsMapper;
import com.example.studyplanning.services.TipsServices;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class TipsServicesImpl implements TipsServices {
    @Autowired
    private TipsMapper tipsMapper;

    @Override
    public List<Tips> findAllTips(Integer tipsID) {
        return tipsMapper.findAllTips(tipsID);
    }

    @Override
    public Integer insertTips(Tips tips) {
        return tipsMapper.insertTips(tips);
    }

    @Override
    public Integer UpdateTipsLike(Tips tips) {
        return tipsMapper.UpdateTipsLike(tips);
    }

    @Override
    public Integer SelectLikes(Integer tipsID) {
        return tipsMapper.SelectLikes(tipsID);
    }

    @Override
    public List<Tips> FindAllTips(String tipsTitle) {
        return tipsMapper.FindAllTips(tipsTitle);
    }

    @Override
    public Integer UpdateLike(Tips tips) {
        return tipsMapper.UpdateLike(tips);
    }

    @Override
    public Integer DelByID(Integer tipsID) {
        return tipsMapper.DelByID(tipsID);
    }

    @Override
    public List<Tips> SelectTipsByID(Integer userID) {
        return tipsMapper.SelectTipsByID(userID);
    }

    @Override
    public List<Tips> SelectTips(String date_time, Integer tipsID, String tipsTitle, Integer tipsType, String tipsContent, String userName) {
        return tipsMapper.SelectTips(date_time,tipsID,tipsTitle,tipsType,tipsContent,userName);
    }

    @Override
    public List<Tips> SelectTheTips(Integer tipsID, String tipsTitle, Integer tipsType, String tipsContent,String userName) {
        return tipsMapper.SelectTheTips(tipsID,tipsTitle,tipsType,tipsContent,userName);
    }

    @Override
    public List<Tips> CountDayTip() {
        List<Tips>list=tipsMapper.CountDayTip();
        return list;
    }

}
